package gui.win.para;

import core.utils.EPara;
import gui.Segl1;
import gui.utils.Borders;
import gui.utils.Slider;
import gui.utils.SliderWrap;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.FlowLayout;
import javax.swing.JFrame;
import javax.swing.JPanel;

/*Author: John Archer, Contact: john.archer.jpa@gmail.com*/
public class Alignment extends JFrame{
    public Alignment(Segl1 Seg_L1){
        super();
        this.setLocation(Seg_L1.getLocationOnScreen().x + 50, Seg_L1.getLocationOnScreen().y + 50);
        this.setLayout(new FlowLayout());
        this.setSize(new Dimension(400, 196));
        JPanel p = new JPanel();
        p.setBorder(Borders.getTitledBorder(Borders.STANDARD_TITLED_BORDER, "ALIGNMENT"));
        p.setLayout(new BorderLayout());

        JPanel p1 = new JPanel();
        p1.setLayout(new BorderLayout());
        p1.add(new SliderWrap(Slider.MAT, 5, 1, EPara.MAT, "Match", 272, 3), BorderLayout.NORTH);
        p1.add(new SliderWrap(Slider.GO, 0, -5, EPara.GO, "Gap Open", 272, 3), BorderLayout.CENTER);
        p1.add(new SliderWrap(Slider.GE, 0, -5, EPara.GE, "Gap Ext.", 272, 3), BorderLayout.SOUTH);
        p.add(p1, BorderLayout.NORTH);

        JPanel p2 = new JPanel();
        p2.setLayout(new BorderLayout());
        p2.add(new SliderWrap(Slider.MIS, 0, -5, EPara.MIS, "Mis-match", 272, 3), BorderLayout.CENTER);
        p.add(p2, BorderLayout.SOUTH);
        this.add(p, BorderLayout.CENTER);
        this.add(new Buttons(this), BorderLayout.SOUTH);

        this.setVisible(true);
        this.setAlwaysOnTop(true);
    }
    public void closeFrame(){this.dispose();}
}
